package com.study.行为型模式.中介者模式;

import java.util.HashMap;

//具体的中介者类
public class ConcreteMediator extends Mediator{

    //集合，放入所有同事对象
    private HashMap<String,Colleague> colleagueHashMap;
    private HashMap<String,String> interMap;

    public ConcreteMediator(){
        colleagueHashMap = new HashMap<>();
        interMap = new HashMap<>();
    }
    @Override
    public void register(String colleagueName, Colleague colleague) {
//        colleagueHashMap.put(colleagueName,colleague);
//        if (colleague instanceof Alarm){
//            interMap.put("Alarm",colleagueName);
//        }else if (colleague instanceof CoffeeMachine){
//            interMap.put("CoffeeMachine",colleagueName);
//        }else if (colleague instanceof TV){
//            interMap.put("TV",colleagueName);
//        }else if (colleague instanceof Curtains){
//            interMap.put("Curtains",colleagueName);
//        }
    }

    @Override
    public void getMessage(int stateChange, String colleagueName) {

    }

    @Override
    public void sendMessage() {

    }
}
